#include <stdio.h>
#include <string.h>
#include "cksum.h"

int main()
{
    char buf[50];
    int i;

    for(i = 0; i < 10; i++)
    {
        if(i < 7) buf[i] = ' '; /*header*/
        buf[7+i] = i+'A';
    }
    buf[i+7]='\0';
    
    printf("%s\n", 7+buf);
    
    insert_cksum(buf, 50);
    printf("%s\n",7+buf);

    buf[7+1] = 'I';
    printf("%s\n",7+buf);

    if( test_cksum(buf, 50) )
    {
        printf("Checksum right\n");
    }
    else
    {
        printf("Checksum wrong\n");
    }

    return 0;

}

